package service.impl;

import dao.StudentDao;
import dao.impl.StudentDaoImpl;
import entity.Student;
import service.StudentService;

import java.util.List;

/*
杨威
2021/9/7
19:36
*/
public class StudentServiceImpl implements StudentService {
    StudentDao studentDao=new StudentDaoImpl();
    @Override
    public int addStudentIfo(Student student) {
        int insert = studentDao.insert(student);
        return insert;
    }

    @Override
    public int deleteByStuId(int stuId) {
        return studentDao.delete(stuId);
    }

    @Override
    public int updateByStuId(Student student) {
        return studentDao.update(student);
    }

    @Override
    public Student selectByStuId(int stuId) {
        return studentDao.selectOne(stuId);
    }

    @Override
    public List<Student> showAllStudent() {
        return studentDao.selectAll();
    }
}
